Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

on supported platforms build with system clang by default #7516

Merged
merged 3 commits into from
Jun 20, 2019

Conversation

spoonincode
Copy link
Contributor

Change Description

compared to clang, building with gcc has shown significant performance degradation particularly for wabt execution. See #7402. Ubuntu 18 & amz2 will now use a system provided clang to build. Compilers used for various platforms:

Platform pre 1.8 1.8 rc2 this PR
Ubuntu 16.04 clang 4 clang 8 (via pin)
Ubuntu 18.04 clang 4 gcc 7 clang 6
Amazon Linux 2 gcc 7 gcc 7 clang 7
Centos 7 gcc 7 gcc 7 gcc 8
macOS clang as provided by Xcode

Centos7 will not be upgraded to clang at this time due to the following reasons:

  • While the clang 5 provided by centos' SCL compiles eosio today, it won't compile various c++17 tests. Therefore it isn't considered safe to invest in.
  • clang 6 is not available in centos' SCL. It is available in Springdale Linux repos (another RHEL clone) but this wasn't considered reasonable to migrate to at the moment
  • clang 7 has been released by RH but no one provides built RPMs yet. (in theory it would be great for us to shepherd this in to centos' SCL)
  • centos7 never used clang for eosio, so it's not technically a performance regression to keep using it in to 1.8 and later
  • EOSVM doesn't suffer from gcc vs clang nearly as badly, so the performance deviation in the future won't be as bad
  • Users can still either
    • install llvm-toolset-6.0 or llvm-toolset-7.0 themselves and use it via setting CC and CXX for the build script
    • Use pinned build getting you a clang 8

Consensus Changes

  • Consensus Changes

API Changes

  • API Changes

Documentation Additions

  • Documentation Additions

Also, make sure that deps are installed before checking if a sufficient compiler is present
also bump the minimum version of clang the script looks for to 6.0 (cmake check is left at 5.0 for now still, still that still technically compiles eosio okay)
@spoonincode spoonincode merged commit 405dce4 into develop Jun 20, 2019
@spoonincode spoonincode deleted the clang_by_default_v2 branch June 20, 2019 20:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants